package app.texas.com.devilfishhouse.View.Fragment.home;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;

import com.baidu.mapapi.SDKInitializer;
import com.baidu.mapapi.map.MapView;
import com.universal_library.fragment.BaseFragment;

import app.texas.com.devilfishhouse.R;
import app.texas.com.devilfishhouse.ui.SimpleBackActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by solin on 2018/7/23.
 * 选择位置信息
 */

public class SearchLocationFragment extends BaseFragment implements View.OnClickListener {
    @BindView(R.id.et_searchinput)
    EditText et_searchinput;

    @BindView(R.id.bmapView)
    MapView mMapView;

    @BindView(R.id.bt_submit)
    Button bt_submit;

    SimpleBackActivity simpleBackActivity;

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_searchlocation;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        SDKInitializer.initialize(getActivity().getApplicationContext());
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    protected void initView(View view) {
        ButterKnife.bind(this, view);
        simpleBackActivity = (SimpleBackActivity) getActivity();
    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.bt_submit})
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_submit:
                simpleBackActivity.onBackPressed();
                break;
        }
    }
}
